package app;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;

import model.AppModel;
import view.AppView;
import controller.AppController;


/**
 * This class initializes the basic MVC framework of the CoolMail application.
 * @author MUSAB, Buthainah
 * @param args
 */
public class Init {
	public static void main(String[] args){
		
		// Read configurations and use them in system if required
		// For paths, we can use / as Java automatically detects the OS and manages it
		String configPath = System.getProperty("user.dir") + "/config/config.properties";
		Properties config;
		config = new Properties();
		
		
    	try {
    		config.load(new FileInputStream(configPath));
    	} catch (IOException ex) {
    		ex.printStackTrace();
        }
    	
		// Init the controller which will then create the models and views
    	AppModel model = new AppModel();
		AppView view = new AppView();
		AppController controller = new AppController(model, view);
		
	}
}
